﻿using System;
using MoonSharp.Interpreter;

// Token: 0x020002B0 RID: 688
public class SpawnEvent : IEvent
{
	// Token: 0x06000F36 RID: 3894 RVA: 0x00073FB3 File Offset: 0x000721B3
	public SpawnEvent(EntityBase entity)
	{
		this.entity = entity;
		this.code = EventCode.OnSpawn;
	}

	// Token: 0x06000F37 RID: 3895 RVA: 0x00073FD0 File Offset: 0x000721D0
	public override DynValue GetLuaData()
	{
		if (this.data == null)
		{
			this.data = DynValue.NewPrimeTable();
			this.data.Table.Set("entity", DynValue.FromObject(null, this.entity.GetLuaEntity()));
		}
		return this.data;
	}

	// Token: 0x0400142C RID: 5164
	public EntityBase entity;
}
